package com.thinkTank.oa.entity;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;

/**
 * 备忘录
 * @author pdz
 * @date 2018年10月24日
 */
public class Memo {
	private String pid;
	private String userId;
	private String content;
	//任务时间，1970-1-1距离现在的毫秒数
	private String taskTime;
	
	public Memo() {}
	
	public Memo(String pid, String userId, String content, String taskTime) {
		this.pid = pid;
		this.userId = userId;
		this.content = content;
		this.taskTime = taskTime;
	}
	
	public static Memo create(String userId) {
		return new Memo(null, userId, null, null);
	}

	public String getPid() {
		return pid;
	}
	public Memo setPid(String pid) {
		this.pid = pid;
		return this;
	}
	public String getUserId() {
		return userId;
	}
	public Memo setUserId(String userId) {
		this.userId = userId;
		return this;
	}
	public String getContent() {
		return content;
	}
	public Memo setContent(String content) {
		this.content = content;
		return this;
	}
	public String getTaskTime() {
		return taskTime;
	}
	public Memo setTaskTime(String taskTime) {
		this.taskTime = taskTime;
		return this;
	}
	
	public static void main(String[] args) {
		Instant instant = Instant.ofEpochMilli(1540339200000L);
		LocalDateTime dateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
		String string = dateTime.toString();
		System.out.println(string);
	}
}
